num = int(input())
root = 0
pwr = 0
for root in range(num):
    for pwr in range(1,6):
        if root ** pwr == num:
            break
    if root ** pwr == num:
        break
print(f"{root} {pwr}")

